package chap04.exercises;

public class Exercises4_4_2 {

	public static void main(String[] args) {
		int[] a=new int[20];
		int i;
		a[0]=a[1]=0;
		a[2]=2;
		a[3]=5;
		for(i=4;i<a.length;i++)
			a[i]=a[i-1]+a[i-2]+a[i-3]+a[i-4];
		i=0;
		for(int x:a) {
			System.out.print(x+"\t");
			if(++i%5==0)System.out.println();
		}

	}

}
